
;; lispy config
;; add (define-key map (kbd "RET") 'lispy-alt-line)  to  lispy-mode-map-base

(add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode)))
(add-hook 'scheme-mode-hook (lambda () (lispy-mode)))
(add-hook 'racket-mode-hook (lambda () (lispy-mode)))
(add-hook 'lisp-mode-hook (lambda ()  (lispy-mode)))


;; clear key binding in evil-insert-state-map
(defun unbindings-in-evil-insert ()
  (define-key evil-insert-state-map (kbd "<delete>") nil)
  (define-key evil-insert-state-map (kbd "C-k") nil)
  (define-key evil-insert-state-map (kbd "C-d") nil)
  (define-key evil-insert-state-map (kbd "C-y") nil)
  (define-key evil-insert-state-map (kbd "C-e") nil))



(add-hook 'scheme-mode-hook #'unbindings-in-evil-insert)
(add-hook 'lisp-mode-hook #'unbindings-in-evil-insert)
(add-hook 'emacs-lisp-mode-hook #'unbindings-in-evil-insert)

(spacemacs/declare-prefix-for-mode 'scheme-mode "mo" "lispy")
(spacemacs/set-leader-keys-for-major-mode 'scheme-mode
  "l" 'lispy-mode
  "ol" 'lispy-mode)

(spacemacs/declare-prefix-for-mode 'racket-mode "mo" "lispy")
(spacemacs/set-leader-keys-for-major-mode 'racket-mode
  "l" 'lispy-mode
  "ol" 'lispy-mode)

(spacemacs/declare-prefix-for-mode 'emacs-lisp-mode "mo" "lispy")
(spacemacs/set-leader-keys-for-major-mode 'emacs-lisp-mode
  "l" 'lispy-mode
  "ol" 'lispy-mode)

(spacemacs/declare-prefix-for-mode 'lisp-mode "mo" "lispy")
(spacemacs/set-leader-keys-for-major-mode 'lisp-mode
  "l" 'lispy-mode
  "ol" 'lispy-mode)
